package com.example.leo.mycharmingstudent.a0915;

import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.leo.mycharmingstudent.R;

public class GlideActivity extends AppCompatActivity {

    //展示图片
    private ImageView ivImage;
    private static final String IMAGE_URL = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600138695061&di=2445ac0688084d480ce55549760469bf&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F14%2F75%2F01300000164186121366756803686.jpg";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_glide);

        ivImage = findViewById(R.id.iv_image_activity_glide);
        Glide.with(this)
                .load(IMAGE_URL)
//                .crossFade()//dontAnimate()关闭动画
//                .placeholder(R.mipmap.ic_launcher)
//                .error(R.mipmap.ic_launcher_round)
//                .override(100,100)
                .into(ivImage);
    }
}
